package com.yang.concurrency.chapter3;

/**
 * @Author: 血魔
 * @Date: Created in 13:44 2021/12/12
 * @Version: 1.0$
 */
public class CreateThread {
    public static void main(String[] args) {
        Thread t1 = new Thread();
        Thread t2 = new Thread();
        System.out.println(t1.getName());
        System.out.println(t2.getName());
        Thread t3 = new Thread("杨兴卓");
        Thread t4 = new Thread("陈瑾玉");
        Thread t5 = new Thread();
        System.out.println(t3.getName());
        System.out.println(t4.getName());
        System.out.println(t5.getName());

//        System.out.println(Thread.currentThread().getName());
        System.out.println(Thread.currentThread().getThreadGroup().getName());
        Thread t6 = new Thread() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getThreadGroup().getName());
            }
        };

        t6.start();

    }
}
